<?php
//declare(encoding='UTF-8');
class  SendMail{
	
	private $senderAddress;
	private $recipientAddress;
	private $subject;
	private $emailBody;
	private $isHTML;
	
	//private const $contentTypeHTML = "text/html; charset=iso-8859-1";
	//private const $contentTypeText = "\r\nContent-Type: multipart/mixed";
		
	//setter declaration
	
	public function setSenderAddress($mySenderAddress){
		$this->senderAddress = $mySenderAddress;
	}
	
	public function setRecipientAddress($myRecipientAddress){
		$this->recipientAddress = $myRecipientAddress;
	}
	
	public function setSubject($mySubject){
		$this->subject = $mySubject;
	}
	
	public function setEmailBody($myEmailBody){
		$this->emailBody = $myEmailBody;
	}
	
	public function setIsHTML($myIsHTML){
		$this->isHTML = $myIsHTML;
	}

	public function sendMail(){
	
	$random_hash = md5(date('r', time()));
	$headers = "From: $this->senderAddress\r\nReply-To: $this->senderAddress \r\n"; 
	$headers .= "MIME-Version: 1.0" . "\r\n";
	$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
	//$headers .= "boundary=PHP-mixed-".$random_hash;
	mail($this->recipientAddress,"$this->subject",$this->emailBody, $headers );
	}
}
?>
?>